1. Field of the Invention
The present invention relates to an image processing apparatus and a method and a program for processing an image, and particularly relates to an image processing apparatus and a method and a program for processing an image capable of readily providing images with a blurring effect though an imaging apparatus with a deep depth of field.
2. Description of the Related Art
Conventionally, as an imaging apparatus for shooting an object, silver-salt film cameras were popular. However, recently digital cameras rapidly become popularized (see Japanese Laid-Open Patent Nos. 2003-209727, 2002-232779, and H10-21034).
As mentioned above, the digital still camera provides an image with the same image quality as the silver-salt film camera. Thus, many users desire to obtain by digital still camera images with various effects that were inherently obtained by the silver-salt film cameras. For example, three are many requests for readily obtaining image in which the object is enhanced by blurring the background. Hereinafter, the image in which the object is enhanced by blurring the background is referred to as an image with the blurring effect.
Conventionally, to obtain such an image with the blurring effect, it was said that the following conditions (1) and (2) were necessary.
(1) The camera has a shallow depth of field (a large-diameter lens or a large lens structure).
(2) The camera user is skilled in a special shooting technique.
In the shot image includes a region where an object is clearly photographed because the image is sharply focused and another region where the image is unclearly photographed because the near and far images are out of focus. The region where the image is clearly photographed corresponds to depth of field. The depth of filed is determined by a focal length and an F value of a lens, and a distance from a camera to an object. Further, generally, when a range where an image is clearly photographed is narrow, the depth of field is expressed as a shallow depth of field, and a wide range where an image is clearly photographed is expressed as a shallow depth of field.
In other words, conventionally, when a photographer (for example, a professional cameraman or the like) meeting the condition (2) shot an image with the silver-salt film camera satisfying the condition (1), an image with the blurring effect can be obtained.
However, the above-described condition (1) is inconsistent with a digital still camera's advantageous effect of high portability by miniaturization. Furthermore, the condition (2) is inconsistent with another digital still camera's advantageous effect of easy operation in shooting. Thus, it is difficult to obtain an image with the blurring effect through a simple user operation with the digital still camera of which depth of field is deep due to possession of the advantageous effect of high portability by miniaturization. In other words, there is a problem that it is currently impossible to satisfy the demand.
Here, obtaining an image having the blurring effect with the digital camera itself is disclosed in, for example, Japanese Laid-Open Patent Application No. 2003-209727. In this Japanese Laid-Open Patent Application No. 2003-209727, focal points at respective minute regions in the image within a focal length adjustment region from near to infinite distances are detected to extract the object by regarding the minute regions showing the same focal length as the same region. Next, a suitable focal point is set on the basis of the focal length for each region to shot the image by a plurality of times. At the last, combining a plurality of images obtained from the result of shooting a plurality of times produces an image in which an amount of blurring adjusted as desired. This technique above mentioned is disclosed in the Japanese Laid-Open Patent Application No. 2003-209727.
However, the technique disclosed in the Japanese Laid-Open Patent Application divides the region using difference in high frequency components occurring on extracting the region in accordance with the focus point, which requires the above-described condition (1). In other words, the technique disclosed in the Japanese Laid-Open Patent Application No. 2003-209727 is applicable to the digital cameras having a shallow depth of field. However, it is difficult to apply the technique disclosed in the Japanese Laid-Open Patent Application No. 2003-209727 to the digital still cameras having a deep depth of field with an advantageous effect of high portability due to miniaturization, namely, to the digital still cameras used by a lot of general users who does not meet the condition (2).
Further, Japanese Laid-Open Patent Applications Nos. 2002-232779 and 10-210340 disclose only techniques distinguishing an object from the background from an image shot by a digital camera, but do not disclose and suggest the image with the blurring effect. Thus, it is difficult to solve the above-disclosed problem by the technologies disclosed in Japanese Laid-Open Patent Applications Nos. 2003-209727, 2002-232779, and 10-210340 (though these including the Japanese Laid-Open Patent Application No. 2003-209727 are combined).
This invention is provided in consideration of the above-described situation to readily provide an image with the blurring effect even if an imaging apparatus with a deep depth of field is used.